package com.hgw.Demo04_BuilderPattern.Exercises6_7_4;

/**
 * Data time:2021/12/13 10:11
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
public class ServerBuilder extends Builder{
    @Override
    public void buildCpu() {
        computer.setCpu("服务器cpu");
    }

    @Override
    public void buildMemory() {
        computer.setMemory("服务器内存");
    }

    @Override
    public void buildHardDisk() {
        computer.setHardDisk("服务器硬盘");
    }

    @Override
    public void buildHost() {
        computer.setHost("服务器主机箱");
    }

    @Override
    public void buildMonitor() {
        computer.setMonitor("不需要显示器");
    }

    // 钩子方法 ： 是否需要显示器
    public boolean isMonitor() {
        return false;
    }
}
